cmake_minimum_required(VERSION 3.27)
project(log4cpp C CXX)

# 设置C和C++标准
set(CMAKE_CXX_STANDARD 11)


# 设置log4cpp路径
set(LOG4CPP_INCLUDE_DIR /usr/include/log4cpp)

# 包含log4cpp头文件路径
include_directories(${LOG4CPP_INCLUDE_DIR})

add_executable(log4cpp #Log4cppFilePattern.cpp
        Log4cppRollingFile.cpp
#        ReadConfig.cpp
#        Log4cppPattern.cpp
)



# 连接log4cpp库
target_link_libraries(log4cpp liblog4cpp.so)

# 添加链接线程
target_link_libraries(log4cpp libpthread.so)
